﻿using Foreglance.MVP.Factories;

namespace Foreglance.MVP.Views.Builders
{
    public class ViewBuilderFactory : AbstractFactory,
                                        IFactory<IDetailViewBuilder>,
                                        IFactory<IListViewBuilder>
    {
        static ViewBuilderFactory()
        {
            Instance = new ViewBuilderFactory();
        }

        public static IAbstractFactory Instance { get; set; }

        IDetailViewBuilder IFactory<IDetailViewBuilder>.Create()
        {
            return new DetailViewBuilder();
        }

        IListViewBuilder IFactory<IListViewBuilder>.Create()
        {
            return new ListViewBuilder();
        }
    }
}
